﻿using Module.Common.Common;
using Module.Common.PubEvent;
using Module.Common.Views;
using Module.Common.Views.Marks;
using ImTools;
using Prism.Events;
using Prism.Ioc;

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using Module.Common.Interface;

namespace Module.FreePlay.Views
{
    /// <summary>
    /// 棋盘类的后台代码
    /// </summary>
    public partial class FreePlayApp : UserControl
    {
        private ChessBoard board;
        public FreePlayApp(IEventAggregator ea, IContainerProvider Cp, LastLocation lastLocation, CurrentLoaction currentLoaction)
        {
            InitializeComponent();
            board = new(ea, Cp, lastLocation, currentLoaction, this.GetType().Module.Name);
            ChessBoardRegion.Children.Add(board);
            board.SetPieceOnDefaultInitPosition();
        }

    }
}
